package routers

import (
	SEESION "gin-project-01/gin-step04/gin15-gorm-advance/controllers/session"
	"gin-project-01/gin-step04/gin15-gorm-advance/middlewares"
	"github.com/gin-gonic/gin"
)

func SessionRouters(r *gin.Engine) {
	//路由分组中间件使用方式一
	routers := r.Group("/session", middlewares.SaveAccessLog)

	{

		//设置session
		routers.GET("/add", SEESION.SessionController{}.Add)

		//获取session
		routers.GET("/get", SEESION.SessionController{}.Get)

		//删除session
		routers.GET("/del", SEESION.SessionController{}.Del)

	}
}
